//
//  BankCardListCell.m
//  JinFuThree
//
//  Created by 毛韶谦 on 2018/9/10.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "BankCardListCell.h"

@interface BankCardListCell ()



@end

@implementation BankCardListCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.bottom.mas_equalTo(self.contentView);
            make.right.mas_equalTo(self.rightLabel.mas_left);
        }];
        [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.top.bottom.mas_equalTo(self.contentView);
            make.width.mas_equalTo(self.leftLabel.mas_width);
        }];
    }
    return self;
}



- (void)updateInfoCellWithModel:(NSIndexPath *)indexPath {
    
    if (indexPath.row == 0) {
        self.leftLabel.textColor = HexColor(0x999999);
        self.rightLabel.textColor = HexColor(0x999999);
        self.leftLabel.text = @"银行名称";
        self.rightLabel.text = @"单笔交易限额";
    }else {
        self.leftLabel.textColor = HexColor(0x151515);
        self.rightLabel.textColor = HexColor(0x151515);
        self.leftLabel.text = @"建设银行";
        self.rightLabel.text = @"50000";
    }
}



- (UILabel *)leftLabel {
    
    if (!_leftLabel) {
        _leftLabel = [[UILabel alloc] init];
        _leftLabel.textColor = HexColor(0x151515);
        [_leftLabel setTextAlignment:NSTextAlignmentCenter];
        _leftLabel.font = [UIFont systemFontOfSize:15];
        
        [self.contentView addSubview:_leftLabel];
    }
    return _leftLabel;
}
- (UILabel *)rightLabel {
    
    if (!_rightLabel) {
        _rightLabel = [[UILabel alloc] init];
        _rightLabel.textColor = HexColor(0x151515);
        [_rightLabel setTextAlignment:NSTextAlignmentCenter];
        _rightLabel.font = [UIFont systemFontOfSize:15];
        
        [self.contentView addSubview:_rightLabel];
    }
    return _rightLabel;
}






- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
